@charset "UTF-8";
//-----------------------------------------------------
// rem scss
//-----------------------------------------------------

$divide: 10;
$pswWidth: 375;
$ppr: 375px/$divide/1rem; // 定义单位

// https://css-tricks.com/snippets/css/less-mixin-for-rem-font-sizing/
@mixin toRem($property, $values...) {
    $max: length($values);
    $remValues: '';
    @for $i from 1 through $max {
        $value: nth($values, $i);
        @if type-of($value) == number {
            $value: nth($values, $i) * $divide / $pswWidth;
        }
        @if type-of($value) == number {
            $remValues: #{$remValues + $value}rem;
        }
        @else {
            $remValues: #{$remValues + $value};
        }
        @if $i < $max {
            $remValues: #{$remValues + " "};
        }
    }
    #{$property}: $remValues;
}
